package com.sanben.common.web.domain;


import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sanben.common.constant.Constant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author: cyh
 * @description: 基础实体类
 * @date: 2020/8/03 10:57
 */
@Data
public class BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableLogic
    @ApiModelProperty("是否已删除 0:未删除,1:删除")
    private Integer delete;

    @ApiModelProperty("创建人")
    private Integer createId;

    @DateTimeFormat(pattern = Constant.PATTERN_DATETIME)
    @JsonFormat(pattern = Constant.PATTERN_DATETIME, timezone = "GMT+8")
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("修改人")
    private Integer updateId;

    @DateTimeFormat(pattern = Constant.PATTERN_DATETIME)
    @JsonFormat(pattern = Constant.PATTERN_DATETIME, timezone = "GMT+8")
    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

}
